<!doctype html> 
<html> 
<head> 
    <meta charset="utf-8"> 
    <title></title> 
    <style type="text/css">
*{margin: 0;padding: 0;list-style: none;}
#div1{width: 100.5px;height: 100.5px;
background: red;position: absolute;left: 0;top: 0;
-margin-left:20px;padding: 20px;
border: 0px solid black 
}
    

    </style>
</head>
<body>
<div id='div1'></div>
<script type="text/javascript">

	function getStyle(obj,name){
		if(obj.currentStyle){
			return obj.currentStyle[name]
		}else{
			return getComputedStyle(obj,false)[name]
		}
	};

	move(div1,'height',200,50);
	function move(obj,curName,iTarget,timer){

		var t = null;
		t = setInterval(function(){
			var cur = parseInt(getStyle(obj,curName));
			//199.5 == 200
			//200.5 == 200;
			if(cur == iTarget){
			//	cur = iTarget
				clearInterval(t);
				return;
			}

			cur+=1;
			obj.style[curName] =cur +'px';
		},timer);


	}



</script>
</body>
</html>